package com.pet.controller;

import com.pet.pojo.ItemCat;
import com.pet.service.ItemCatService;
import com.pet.vo.SysResult;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/*  陈丽君  */
@RestController
@CrossOrigin
@RequestMapping("/itemCat")
public class ItemCatController {
    @Autowired
    private ItemCatService itemCatService;
    @GetMapping("/getAll")
    public SysResult getItemCat(){
        List<ItemCat> itemCatList = itemCatService.getItemCat();
        return SysResult.success(itemCatList);
    }
}
